#include <bits/stdc++.h>
using namespace std;

using llt = long long;
using pii = pair<int, int>;
using vpii = vector<pii>;
using vi = vector<int>;
using vll = vector<llt>;

llt const INF = 0x1F2F3F4F5F6F7F8F;
llt const NINF = -INF;

template<typename T>
istream & operator >> (istream & is, vector<T>&v){
    for(auto & i : v) is >> i;
    return is;
}

template<typename T>
void input(vector<T>&v, int n){
    v.assign(n, {});
    for(int i=1;i<=n;++i)cin>>v[i];
    return;
}


void work(){
    int cnt = 0;
    int n; cin >> n;
    for(int i=0;i<n;++i){
        string s; cin >> s;
        if(s == "Takahashi") cnt += 1;
    }
    cout << cnt << endl;
    return;
}

int main(){
#ifndef ONLINE_JUDGE
    freopen("z.txt", "r", stdin);
#endif
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int nofkase = 1;
    // cin >> nofkase; 
    while(nofkase--) work();
    return 0;
}
